public class Main {
	
	public static void main(String[] args){
		Animal[] anarray = new Animal[4];
		anarray[0] = new Reptile("R1",1,2);
		anarray[1] = new OutdoorMammal("OM1",12,3,"Leaves");
		anarray[2] = new IndoorMammal("IM1",19,5,200);
		anarray[3] = new Animal("AN1",12);
		
		printInfo(anarray);
		
	}
	
	public static void printInfo(Animal[] classarray){
		
		for(int i = 0;i<classarray.length;i++){
			
			System.out.println(classarray[i].toString());
			/*System.out.println(classarray[i].getName());
			System.out.println(classarray[i].getAge());
			
			if(classarray[i] instanceof Reptile){
				Reptile r = (Reptile)classarray[i];
				System.out.println(r.getTemp());
			}
			else if(classarray[i] instanceof Mammal){
				Mammal m = (Mammal)classarray[i];
				System.out.println(m.getEnvSize());
				
				if(classarray[i] instanceof IndoorMammal){
					IndoorMammal im = (IndoorMammal) classarray[i];
					System.out.println(im.getHeight());
				}
				else{//Must  be outdoor mammal
					OutdoorMammal om = (OutdoorMammal)classarray[i];
					System.out.println(om.getFlora());
				}
			}*/
		}
	}
	
	
}
